package com.example.film.mapper;

import com.example.film.entity.Top100ChinaSell;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface Top100ChinaSellMapper {

    //查看top100中国电影票房信息
    @Select("select rank,filmName,picture,director,star,\n" +
            "type,area,showYear,box_office,score from top100chinasell")
    List<Top100ChinaSell> findTop100ChinaSell();

    //分页查询top100中国电影票房信息
    @Select("select rank,filmName,picture,director,star,\n" +
            "type,area,showYear,box_office,score from top100chinasell LIMIT #{pageSize} OFFSET #{startIndex}")
    List<Top100ChinaSell> findTop100ChinaSellInfo(@Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);

    //历年冠军影片票房信息
    @Select("select filmName,showYear,box_office,score from filmeachmaxsell")
    List<Top100ChinaSell> findFilmEachMaxSell();
}
